<?php slot('article','active'); ?>
<div class="row-fluid">
<div class="box span12">
					<div class="box-header">
						<h2><i class="icon-user"></i>模块导航</h2>
					</div>
					<div class="box-content">
                                          <ul class="nav tab-menu nav-tabs" id="myTab">
							<li class="active"><a href="#info">功能</a></li>
							<li><a href="#custom">统计信息</a></li>
						</ul>
                                          <div id="myTabContent" class="tab-content">
                                              <div class="tab-pane active" id="info">
						<a class="quick-button-small span1" href="<?php echo url_for('article/add'); ?>">
							<i class="icon-edit"></i>
							<p>发布文章</p>
							<!--<span class="notification blue">7</span>-->
						</a>
                                                <a class="quick-button-small span1" href="<?php echo url_for('article/index'); ?>">
							<i class="icon-share-alt"></i>
							<p>返回列表</p>
							<!--<span class="notification blue">7</span>-->
						</a>
<!--                                                <a class="quick-button-small span1" id="delete_all" href="javascript:;">
							<i class="icon-share-alt"></i>
							<p>删除</p>
							<span class="notification blue">7</span>
						</a>-->
						<div class="clearfix"></div>
                                                </div>
                                            <div class="tab-pane" id="custom">
                                              <div class="row-fluid">
				
                                                    <div class="span3 smallstat box mobileHalf noMargin" ontablet="span6" ondesktop="span3">
                                                            <i class="icon-user green"></i>
                                                            <span class="title">文章总数</span>
                                                            <span class="value"></span>
                                                    </div>

<!--                                                    <div class="span3 smallstat mobileHalf box" ontablet="span6" ondesktop="span3">
                                                            <i class="icon-money yellow"></i>
                                                            <span class="title">激活</span>
                                                            <span class="value">$19 999,99</span>
                                                    </div>-->

                                            </div>
                                              
                                            </div>
                                          </div>
					</div>	
				</div><!--/span-->
<div class="row-fluid">
   <?php for($i=1;$i<=4;$i++): ?>
				<div class="span3 smallchart blue box mobileHalf">
					<div class="title">推荐位<?php echo $i;?></div>
					<div class="content">
						<div class="chart-stat">
                                                    <?php if(isset($position_info[$i])): ?>
							<img src="<?php echo $position_info[$i]['cover']; ?>" width="110" />
                                                    <?php endif; ?>
						</div>
					</div>
					<div class="value">
                                            <?php if(isset($position_info[$i])): ?>
							<?php echo $position_info[$i]['title']; ?>
                                                    <?php else: ?>未设置<?php endif; ?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                            <a href="<?php echo url_for('article/recommend?position='.$i); ?>" >更新推荐位置</a>
                                        </div>
				</div>
    <?php endfor; ?>
    </div>
    <div class="row-fluid">
    <?php for($i=5;$i<=8;$i++): ?>
				<div class="span3 smallchart blue box mobileHalf">
					<div class="title">推荐位<?php echo $i;?></div>
					<div class="content">
						<div class="chart-stat">
                                                    <?php if(isset($position_info[$i])): ?>
							<img src="<?php echo $position_info[$i]['cover']; ?>" width="110" />
                                                    <?php endif; ?>
						</div>
					</div>
					<div class="value">
                                            <?php if(isset($position_info[$i])): ?>
							<?php echo $position_info[$i]['title']; ?>
                                                    <?php else: ?>未设置<?php endif; ?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                            <a href="<?php echo url_for('article/recommend?position='.$i); ?>" >更新推荐位置</a>
                                        </div>
				</div>
    <?php endfor; ?>
</div>
<div class="row-fluid">
				<div class="box span12">
					<div class="box-header">
						<h2><i class="icon-edit"></i>推荐更新</h2>
						<div class="box-icon"></div>
					</div>
					<div class="box-content">
              <?php if($sf_user->hasFlash('error')): ?>
              <div class="alert alert-error">
                      <button type="button" class="close" data-dismiss="alert">×</button>
                      <strong>错误！</strong>  <?php echo $sf_user->getFlash('error'); ?>
              </div>
              <?php endif; ?>
              <?php if($sf_user->hasFlash('success')): ?>
              <div class="alert alert-success">
                      <button type="button" class="close" data-dismiss="alert">×</button>
                      <strong>操作成功！</strong> <?php echo $sf_user->getFlash('success'); ?>
              </div>
              <?php endif; ?>
                                          
                                            <form class="form-horizontal" action="<?php echo url_for('article/recommend'); ?>" method="post" enctype="multipart/form-data">
                                                <input type="hidden" name="position" value="<?php echo $sf_request->getParameter('position',0); ?>" />
						  <fieldset>
							<div class="control-group ">
								<label class="control-label" for="focusedInput">文章ID</label>
								<div class="controls">
                                                                    <input class="input-xlarge focused" name="article_id" type="text" value="<?php echo (isset($recommend_article) && ($recommend_article) != FALSE)  ? $recommend_article->getArticleId() : ''; ?>" />
                                   <span class="help-inline"></span>
								</div>
							  </div>
                                                      <div class="control-group ">
								<label class="control-label" for="focusedInput">推荐标题</label>
								<div class="controls">
								  <input class="input-xlarge focused" name="title" type="text" value="<?php echo (isset($recommend_article) && ($recommend_article) != FALSE) ? $recommend_article->getTitle() : ''; ?>" />
                                   <span class="help-inline"></span>
								</div>
							  </div>
                            <div class="control-group">
							  <label class="control-label" for="fileInput">封面</label>
							  <div class="controls">
								<input class="input-file uniform_on" name="cover" type="file" />
                                                                <input type="hidden" name="image_url" value="<?php echo (isset($recommend_article) && ($recommend_article) != FALSE) ? $recommend_article->getCover() : ''; ?>" />
							  </div>
							</div>              
				<div class="form-actions">
							  <input type="submit" class="btn btn-primary" value="保存数据" />
							</div>
						  </fieldset>
						</form>
					</div>
				</div><!--/span-->

			</div>]
</div>